1. Field of the Invention
The present invention relates to an image data encoding device for compressing and encoding image data.
2. Description of the Background Art
In digital audio visual apparatuses such as recordable/reproducible DVDs (Digital Versatile Discs), D-VHSs (Digital-Video Home Systems), digital broadcast transmitters and receivers and the like, the International Standard MPEG2 (Moving Picture Experts Group 2: ISO-IEC/JTC1 SC29 DIS13818, Part 2, 1994) is employed as a method of compressing image data. In an encoding process of image data based on the MPEG2 standard, there are an enormous amount of operation required for image data compression and an enormous amount of data transfer between a signal processing device and a memory device.
FIG. 20 shows a structure of a conventional image data encoding device 200. As shown in FIG. 20, the image data encoding device 200 comprises an MPEG2 processing unit 102 compressing and encoding image data and a memory interface 103 controlling data transfer. The MPEG2 processing unit 102 and the memory interface 103 are connected to each other through a bus 101. An external memory 107 provided outside such as a general purpose DRAM (Dynamic Random Access Memory) is connected to the memory interface 103 through a bus 106.
The MPEG2 processing unit 102 includes an encoder, a decoder and a motion estimation device, and an original image before data compression is inputted into the encoder as a video input 108. Image data encoded in the encoder is outputted as a bit stream output 109. The decoder decodes the encoded image data and outputs it as a video output 110 so that it can be monitored if the image data has been encoded appropriately.
FIG. 21 is a flow chart showing data transfer in an encoding process at each frame of the image data encoding device 200. First, original image data is inputted into the MPEG2 processing unit 102 as the video input 108, where the data undergoes space filtering and time filtering as preceding processes. Here, the space filtering indicates a process of filtering an image signal in the same frame to remove high-frequency noise, and the time filtering indicates a process of comparing pixels between a frame and the subsequent one to remove high-frequency noise.
The original image data having already undergone the space filtering is stored in the external memory 107 through the bus 101, the memory interface 103 and the bus 106 by each frame. In the time filtering, the MPEG2 processing unit 102 reads out image data from the external memory 107 and compares pixels between a frame and the subsequent one, thereby removing high-frequency noise.
The original image data having already undergone the preceding processes is stored in the external memory 107 through the bus 101, the memory interface 103 and the bus 106 by each frame (step S1f).
After image data is stored for several frames, the data in the frames being images to be encoded is reordered in the sequence for subsequent motion search, and thereafter, is read out into the encoder in the MPEG2 processing unit 102 (step S2f).
First, the encoder encodes an I (Intra) frame, and encoded information is outputted as the bit stream output 109 (step S7f). The encoding process includes discrete cosine transformation, quantization, variable length encoding and the like. In the case of an I frame, intra-frame encoding is performed, so that motion search is not carried out.
In the decoder in the MPEG2 processing unit 102, the video output 110 is generated for monitoring the encoded data (step S8f). Further, decoded image data is data of an image reconfigured by a series of encoding processes (reconfigured image) and is also stored in the external memory 107 through the bus 101, the memory interface 103 and the bus 106 so as to be used as a reference image for estimating a frame and the subsequent one.
Next, an encoding process of a P (Predictive) frame will be described. First, reordered image data is read out into the encoder (step S2f). In the case of a P frame, motion search (including associated reverse quantization and reverse discrete cosine transformation) is performed in the motion estimation device based on a reconfigured image of I or P frame. The encoder configures a new image (estimation image) based on a motion vector obtained by the motion search, and thereafter, carries out encoding.
As an example of the motion search, FIG. 21 shows a case where search is performed with integer pixel accuracy to roughly estimate the motion, and thereafter, search is performed with half-pel (half pixel) accuracy to determine the motion vector with high accuracy (steps S3f, S4f). In either motion search, a reference image for the motion search is of I or P frame. Therefore, when generating a first P frame, for example, the reconfigured image previously reconfigured is read out from the external memory 107.
At this time, the memory interface 103 reads out image data of the reconfigured image from the external memory 107 as a reference image (search window data), and sends the image data to the MPEG2 processing unit 102. The original image data of the P frame read out from the external memory 107 in step S2f is used in the motion estimation device as a template image to be the origin of generation of an estimation image.
The MPEG2 processing unit 102 performs motion search using the template image and the search window data, thereby obtaining the motion vector.
Subsequently, the MPEG2 processing unit 102 generates an estimation image based on the obtained motion vector (step S5f). As the generation is based on I or P frame, the reconfigured image of the I frame is read out again from the external memory 107 when generating a first P frame, for example.
The generated estimation image is written into the external memory 107 as a reconfigured image (step S6f), and thereafter, the encoder performs encoding. That is, the encoder reads out the reconfigured image from the external memory 107 (step S2f) for encoding, and outputs encoded information as the bit stream output 109 (step S7f).
As in the case of an I frame, the decoder generates the video output 110 for monitoring the encoded data (step S8f). The reconfigured image in the external memory 107 is also used as a reference image for estimating the next frame.
In the next and later generation of P frames, data of the reconfigured image of a P frame is read out instead of that of an I frame.
Next, an encoding process of a B (Bidirectionally predictive) frame will be described. Motion search is carried out in a B frame as in a P frame to configure a new image based on a motion vector obtained by the motion search, and thereafter, encoding is performed. Thus, the flow of the chart shown in FIG. 21 is the same as that of a P frame.
In the case of a B frame, however, the motion search is performed based not only on past image data but also on future image data, resulting in an increase in the amount of the motion search in steps S3f and S4f (the motion search is carried out based on future image data alone for a B frame in an early stage of encoding where past image data does not exist).
As has been described, in the encoding process of image data based on the MPEG2 standard, there are enormous amounts of operations for image data compression and enormous amounts of data transfer between a signal processing device (image data encoding device 200 in FIG. 20) and a memory device (external memory 107 in FIG. 20).
In processing these enormous amounts of data, there arises a problem of how to construct the image data encoding device. In other words, a subject in system construction of the encoding device has been how to solve degradation in performance (degradation in display image quality) due to lack of processing capability and data transfer capability.
In the structure of the image data encoding device shown in FIG. 20, employment of the memory device such as a general purpose DRAM results in that the processing capability in data transfer is limited by the operational speed of input/output pins and the bus width between the memory interface 103 and the external memory 107.
For instance, MPEG2 encoding of image data at a resolution of the digital television standard SDTV (Standard Definition TV) having the same image quality as the current broadcast requires a memory having a capacity of 32 megabits or more. Further, MPEG2 encoding of image data at a resolution of HDTV (High Definition TV) having higher image quality requires a memory having a capacity of 256 megabits or more.
In order to transfer image data stored in such a large-capacity memory rapidly and effectively, it is desirable to speed up operation at input/output pins and to increase the bus width. However, when a memory device such as a general purpose DRAM is employed, such a desire is not realized immediately.